package com.gxar.quick.ar.server.base.model.material.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author linsy
 * @version 1.0
 * @created 2024/1/22 10:57
 */
@Data
public class MaterialVO {

    @ApiModelProperty("素材名称")
    @JSONField(name = "name")
    @JsonProperty("name")
    @NotBlank(message = "素材名称不能为空")
    private String name;

    @ApiModelProperty("素材地址")
    @JSONField(name = "link_url")
    @JsonProperty("link_url")
    @NotBlank(message = "素材地址不能为空")
    private String linkUrl;

    @ApiModelProperty("素材高度")
    @NotNull(message = "素材高度不能为空")
    private Integer height;

    @ApiModelProperty("素材宽度")
    @NotNull(message = "素材宽度不能为空")
    private Integer width;

    @ApiModelProperty("x轴起点坐标，视频框必填")
    @JSONField(name = "inner_x")
    @JsonProperty("inner_x")
    private Integer innerX;

    @ApiModelProperty("y轴起点坐标，视频框必填")
    @JSONField(name = "inner_y")
    @JsonProperty("inner_y")
    private Integer innerY;
    /**
     * 素材类型
     * {@link  com.gxar.quick.ar.server.base.common.enums.MaterialTypeEnum}
     */
    @ApiModelProperty("素材类型：1-文本框，2-视频框，4-图片, 5-音频")
    @NotNull(message = "素材类型不能为空")
    private Integer type;

    @ApiModelProperty("缩略图链接")
    @JSONField(name = "image_url")
    @JsonProperty("image_url")
    @NotBlank(message = "缩略图不能为空")
    private String imageUrl;

    @ApiModelProperty("素材内部高度，视频框必填")
    @JSONField(name = "inner_height")
    @JsonProperty("inner_height")
    private Integer innerHeight;

    @ApiModelProperty("素材内部宽度，视频框必填")
    @JSONField(name = "inner_width")
    @JsonProperty("inner_width")
    private Integer innerWidth;
}
